package com.cf.mvp.sample.mvp.contract;

import com.cf.mvp.mvp.IBaseView;
import com.cf.mvp.mvp.IModel;
import com.cf.mvp.mvp.IPresenter;

/**
 * 模拟网络监听 Presenter
 *
 * @author yangji
 */
public interface NetworkContract {
    interface View extends IBaseView {
        /**
         * 模拟网络信号
         *
         * @param signal 信号
         */
        void onNetworkSignal(Long signal);
    }

    interface Presenter extends IPresenter<View> {

        /**
         * 请求Presenter 处理网络监听
         */
        void requestNetwork();

        /**
         * model 处理返回给Presenter
         *
         * @param signal
         */
        void responseNetwork(int signal);
    }

    interface Model extends IModel<Presenter> {
        /**
         * 底层处理网络监听
         */
        void registerNetworkListener();
    }
}
